package com.waitingresult.web3j.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.web3j.protocol.Web3j;
import org.web3j.protocol.http.HttpService;

import javax.annotation.Resource;

@RestController
public class DemoWeb3jController {
    @Resource
    private Web3j web3j;

    @RequestMapping("demo")
    public Object demo(){
        Web3j web3 = Web3j.build(new HttpService("https://morden.infura.io/your-token"));
        //web3.web3ClientVersion().send()
        return null;
    }
}
